<template>
 
  <div class="tables"  v-if="
      zjListSun&&zjListSun.length!==0
    ">
    <el-table
    default-expand-all
      :data="zjListSun"
      style="width: 100%; margin-bottom: 20px"
      row-key="id"
      lazy
      :expand-row-keys="expandRowkkeys"
      :tree-props="{ children: 'child' }"
    >
      <el-table-column prop="zj_name" label="试卷名称" width="580">
      </el-table-column>
      <el-table-column prop="yzst" label="做题进度"> </el-table-column>
      <el-table-column prop="yzPer" label="做题比例"> </el-table-column>
      <el-table-column label="试题（有/无）">
        <template slot-scope="scope">
          {{ scope.row.is_st == 0 ? "无" : "有" }}
        </template>
      </el-table-column>
      <el-table-column width="180">
        <template slot-scope="scope">
          <el-button class="begin" @click="dan(scope.row)" v-show=" scope.row.is_st">开始做题</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
   <div
    class="no-data"
   v-else
  ></div>
</template>

<script>
export default {
  props: {
    zjList: {
      type: Array,
    },
  },
  data() {
    return {
      zjListSun: [],
      expandRowkkeys:["774"]
    };
  },
  methods: {
    dan(row) {
      this.$emit("gost", row);
    },
  },
  watch: {
    zjList() {
      this.zjListSun = this.zjList;
    },
  },
  created() {},
  mounted() {},
};
</script>

<style lang="scss" scoped>
::v-deep.tables {
  .cell {
    .el-table__expand-icon {
      .el-icon-arrow-right {
        display: none !important;
      }
    }
  }
}
</style>